package com.rybbaby.tss.platform.sysCitys.dao.imp;

import com.rybbaby.tss.core.web.dao.imp.GenericDao;
import com.rybbaby.tss.platform.sysCitys.dao.ISysCitysDao;
import com.rybbaby.tss.platform.sysCitys.entity.SysCitys;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description 全球城市数据库操作实现
 * 
 * @author 谢进伟
 * 
 * @createDate 2016-11-30 下午3:21:45
 */
@Repository
public class SysCitysDaoImp extends GenericDao<SysCitys> implements ISysCitysDao {

    /**
     * 根据父级Id获取下级城市/区/县
     *
     * @param pId 父级Id
     * @return
     */
    @Override
    public List<SysCitys> getChildrens(String pId) {
        return this.findByHql("from SysCitys where pId='"+pId+"'");
    }
}
